<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        img{
            width: 200px;
        }
    </style>
</head>
<body>
<div></div>

<script>
    let d=document.querySelector("div");

    let arr=[
        {name:"刘备",url:"1.jpg"},
        {name:"关羽",url:"2.jpg"},
        {name:"张飞",url:"3.jpg"}
        ];

    for (let i = 0; i <arr.length ; i++) {
        let p=arr[i];
        d.innerHTML+="<h1>姓名'"+p.name+"'</h1>";
        d.innerHTML+="<img src='"+p.url+"' alt=''>";
    }
</script>
</body>
</html>